/**
* Copyright (C) 2018-2020
* All rights reserved, Designed By www.yixiang.co
* 注意：
* 本软件为www.yixiang.co开发研制，未经购买不得使用
* 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
* 一经发现盗用、分享等行为，将追究法律责任，后果自负
*/
package co.yixiang.modules.auction.service;
import co.yixiang.api.ApiResult;
import co.yixiang.common.service.BaseService;
import co.yixiang.modules.auction.domain.YxAuctionOrder;
import co.yixiang.modules.auction.service.dto.*;
import co.yixiang.modules.user.domain.YxUser;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.data.domain.Pageable;

import java.text.ParseException;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* @author yhh
* @date 2020-09-21
*/
public interface YxAuctionOrderService  extends BaseService<YxAuctionOrder>{

/**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(YxAuctionOrderQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<YxAuctionOrderDto>
    */
    List<YxAuctionOrder> queryAll(YxAuctionOrderQueryCriteria criteria);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<YxAuctionOrderDto> all, HttpServletResponse response) throws IOException;

    ApiResult<Object> seckillRecord(Long uid, long id) ;

    ApiResult<Object> turnAuction(YxUser yxUser, String id, Integer payType, String payPassword, String signatureImg ,String yjbl,HttpServletRequest request) throws ParseException;

    ApiResult<YxAuctionOrderConfirm> confirmOrder(Long uid, Long oid);

    ApiResult<Object> confirm(Long uid, Long id, Long userAddressId);

    ApiResult<Page<YxAuctionOrderList>> productOrderPage(Long uid,Integer type, int page, int limit);

    ApiResult<Page<YxAuctionOrderList>> productHistoryOrderPage(Long uid, Integer valueOf, int page, int limit);

    ApiResult<YxAuctionRecordDto> findAuctionOrderDetail(Long uid, Long valueOf);

    YxAuctionOrder selectByAuctionRecord(Long id);

    void addRedis(Long id);

    ApiResult<Object> oneKeyAuction(YxUser yxUser, String ids, Integer payType, String payPassword, String signatureImg ,HttpServletRequest request);

    ApiResult<Object> findTotalMoney(YxUser yxUser, String ids, HttpServletRequest request);


    ApiResult<Object> getPopUpData(String ids);

    /**
     * 兑换积分
     * @param uid
     * @param valueOf
     * @return
     */
    ApiResult<Object> creditsExchange(Long uid, Long valueOf);

    void singleOrder(List<SingleDto> singleDtoList, Long uid);
}
